<%@ page import="cn.dai.pojo.Menu" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/6/13
  Time: 19:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户主页</title>
    <style type="text/css">
        a {
            text-decoration: none;

        }
    </style>
</head>
<body>


<h1> 这里是用户主页 仅测试用 </h1>

<p> 欢迎用户：${requestScope.user.u_name} ，当前身份：${requestScope.role.r_name} </p>
<p> 登陆时间：<%= new SimpleDateFormat("yyyy年MM月dd日 - HH时mm分ss秒").format(new Date()) %> <a href="login?act=toLogout"> [ 退出登陆 ] </a>  </p>

<ul>
    <c:forEach items="${requestScope.menus}" var="mainmenu" varStatus="menuVs">
        <c:if test="${mainmenu.m_parent_id == 0}">
            <li>
                ${mainmenu.m_name}
                <ul>
                    <c:forEach items="${requestScope.menus}" var="submenu">
                        <c:if test="${submenu.m_parent_id == mainmenu.m_id}">
                            <li>
                                <a target="_blank" href="${submenu.m_url}"> ${submenu.m_name} </a>

                            </li>
                        </c:if>
                    </c:forEach>
                </ul>
            </li>
        </c:if>

    </c:forEach>
</ul>

</body>
</html>
